package com.qc.educms.controller;


import com.qc.commonutils.result.R;
import com.qc.educms.entity.CrmBanner;
import com.qc.educms.service.CrmBannerService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 首页banner表 前端控制器
 * </p>
 *
 * @author AltmanQc
 * @since 2021-03-25
 */
@Api("Banner前端管理")
@RestController
@CrossOrigin
@RequestMapping("/educms/bannerFront")
public class BannerFrontController {

    @Autowired
    private CrmBannerService bannerService;

    //前端banner展示
    @GetMapping("bannerList")
    public R bannerList(){
        List<CrmBanner> bannerList  = bannerService.bannerList();
        return R.ok().data("items",bannerList);
    }

    

}

